package com.testbank.practise.sqltables;

import android.content.ContentValues;

public class QuestionSetsTable{

	public static final String TABLE_NAME = "QuestionSets";
	
	public static final String KEY_QID = "qId";
	public static final String KEY_QUESTION = "question";
	public static final String KEY_IMAGE = "image";
	public static final String KEY_OP1 = "option1";
	public static final String KEY_OP2 = "option2";
	public static final String KEY_OP3 = "option3";
	public static final String KEY_FEEDBACK = "feedback";
	public static final String KEY_CAT = "category";
	public static final String KEY_BOOK = "bookNum";
	
	public static final String CREATE = "CREATE TABLE " + TABLE_NAME + " ("
									+ KEY_QID + " integer primary key, "
									+ KEY_QUESTION + " text, "
									+ KEY_IMAGE + " text, "
									+ KEY_OP1 + " text, "
									+ KEY_OP2 + " text, "
									+ KEY_OP3 + " text, "
									+ KEY_FEEDBACK + " text, "
									+ KEY_CAT + " integer, "
									+ KEY_BOOK + " integer);";
	
	public static final int KEY_QID_INDEX = 0;
	public static final int KEY_QUESTION_INDEX = 1;
	public static final int KEY_IMAGE_INDEX = 2;
	public static final int KEY_OP1_INDEX = 3;
	public static final int KEY_OP2_INDEX = 4;
	public static final int KEY_OP3_INDEX = 5;
	public static final int KEY_FEEDBACK_INDEX = 6;
	public static final int KEY_CAT_INDEX = 7;
	public static final int KEY_BOOK_INDEX = 8;
	
	public static ContentValues GetCVRow (String question, String image, String op1, String op2, String op3, String feedback, int category, int book) {
		ContentValues newQSetRow = new ContentValues();
		newQSetRow.put(KEY_QUESTION, question);
		newQSetRow.put(KEY_IMAGE, image);
		newQSetRow.put(KEY_OP1, op1);
		newQSetRow.put(KEY_OP2, op2);
		newQSetRow.put(KEY_OP3, op3);
		newQSetRow.put(KEY_FEEDBACK, feedback);
		newQSetRow.put(KEY_CAT, category);
		newQSetRow.put(KEY_BOOK, book);
		
		return newQSetRow;
	}

}
